package com.github.maojian.classload;

public class ClassLoadDemo {

    public static void main(String[] args) throws ClassNotFoundException {
        ClassLoader classLoader = ClassLoadDemo.class.getClassLoader();
        System.out.println("classLoader:" + classLoader);
        System.out.println("classLoader parent:" + classLoader.getParent());
        System.out.println("grant parent:" + classLoader.getParent().getParent());

        ClassLoader stringClassLoader = Integer.class.getClassLoader();
        System.out.println("String classLoader:" + stringClassLoader);

        System.out.println(classLoader.loadClass("java.util.List").getClassLoader());

        System.out.println(System.getProperty("sun.boot.class.path"));

        System.out.println(System.getProperty("java.ext.dirs"));

        System.out.println(System.getProperty("java.class.path"));
    }
}
